<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .parent {
        perspective: 1000px;
        perspective-origin: center center;
        transform-style: preserve-3d;
      }
      .box {
        width: 200px;
        height: 200px;
        position: absolute;
        background-color: #fac;
      }
      .box1 {
        background-color: #fca;
        transform: rotateX(45deg);
      }
    </style>
  </head>
  <body>
    <div class="parent">
      <div class="box"></div>
      <div class="box box1"></div>
    </div>

    <div class="box1 perspective">
        <div class="box2 preserve-3d">
            <div class="box3">3d变换</div>
        </div>
    </div>
  </body>
</html>

